<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
	<title>第一题</title>
		<style>
			p{
				margin: 0;
			}
			#div1 div{
				width: 200px;
				height: 150px;
			}
			#div1 div #one{
				color: white;
			}
		</style>
	</head>
	<body>
		<div id="div1">
			<ul>
				<li>what is javascript</li>
			</ul>
			<input type="checkbox" />两周内自动登录
			<div id="div" onmouseover="over()" onmouseleave="leave()">
				<p id="one">为了你的信息安全...</p>
				<p id="two">这是另外的内容</p>
			</div>
		</div>
		<script>
			var div=document.getElementById('div');
			var one=document.getElementById('one');
			var two=document.getElementById('two');
			function over(){
				div.style.background='gainsboro';
				one.style.color='gray';
				two.style.color='darkgray'
			}
			function leave(){
				div.style.background='white';
				one.style.color='white';
				two.style.color='black'
			}
		</script>
	</body>
</html>
